//
//  NewsCTCell.m
//  suRead
//
//  Created by lidi on 2018/1/30.
//  Copyright © 2018年 bao. All rights reserved.
//

#import "NewsCTCell.h"
#import "UIImageView+WebCache.h"
#import "M_News.h"

@interface NewsCTCell()
@property (strong, nonatomic) IBOutlet UIImageView *imageViewCT;

@end
@implementation NewsCTCell

- (void)awakeFromNib {
    [super awakeFromNib];
    if ( [[[UIDevice currentDevice]systemVersion] floatValue] >= 8.0) {
        self.layoutMargins = UIEdgeInsetsZero;
        self.preservesSuperviewLayoutMargins = NO;
        self.separatorInset = UIEdgeInsetsMake(0, 15.0f, 0, 15.0f);
    }
}

- (void)setNewsData:(M_News *)newsData
{
    NSString *imageURL = newsData.f_thumbnail;
    [self.imageViewCT sd_setImageWithURL:[NSURL URLWithString:imageURL] placeholderImage:[UIImage imageNamed:@"lazy"]];
}

@end
